import { EventHandler, IValid } from "../../interfaces";

export interface IModel<C = any, D = any> {

    setState(s: number): void;

    getState(): number;

    setCfg(cfg: C): void;

    getCfg(): C

    setDB(d: D): void;

    getDB(): D

    init(): void;

    on(topic: string, handler: EventHandler, target: IValid): void

    off(topic: string, handler: EventHandler, target: IValid): void

    emit(topic: string, data: any): void
}
